package com.ruoyi.project.para.srn.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.para.srn.mapper.SmSrnInfoMapper;
import com.ruoyi.project.para.srn.domain.SmSrnInfo;
import com.ruoyi.project.para.srn.service.ISmSrnInfoService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 核算码Service业务层处理
 *
 * @author ruoyi
 * @date 2020-03-14
 */
@Service
public class SmSrnInfoServiceImpl extends ServiceImpl<SmSrnInfoMapper, SmSrnInfo> implements ISmSrnInfoService
{
    @Autowired
    private SmSrnInfoMapper smSrnInfoMapper;

    /**
     * 查询核算码
     *
     * @param id 核算码ID
     * @return 核算码
     */
    @Override
    public SmSrnInfo selectSmSrnInfoById(String id)
    {
        return smSrnInfoMapper.selectSmSrnInfoById(id);
    }

    /**
     * 查询核算码列表
     *
     * @param smSrnInfo 核算码
     * @return 核算码
     */
    @Override
    public List<SmSrnInfo> selectSmSrnInfoList(SmSrnInfo smSrnInfo)
    {
        return smSrnInfoMapper.selectSmSrnInfoList(smSrnInfo);
    }

    /**
     * 新增核算码
     *
     * @param smSrnInfo 核算码
     * @return 结果
     */
    @Override
    public int insertSmSrnInfo(SmSrnInfo smSrnInfo)
    {
        return smSrnInfoMapper.insertSmSrnInfo(smSrnInfo);
    }

    /**
     * 修改核算码
     *
     * @param smSrnInfo 核算码
     * @return 结果
     */
    @Override
    public int updateSmSrnInfo(SmSrnInfo smSrnInfo)
    {
        return smSrnInfoMapper.updateSmSrnInfo(smSrnInfo);
    }

    /**
     * 删除核算码对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteSmSrnInfoByIds(String ids)
    {
        return smSrnInfoMapper.deleteSmSrnInfoByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除核算码信息
     *
     * @param id 核算码ID
     * @return 结果
     */
    @Override
    public int deleteSmSrnInfoById(String id)
    {
        return smSrnInfoMapper.deleteSmSrnInfoById(id);
    }
}
